Security and Cryptography
-
Entropy
- Entropy is a measure of randomness.
-
Hash functions
- A cryptographic hash function maps data of arbitrary size to a fixed size, and has some special properties.
hash(value: array<byte>) -> vector<byte, N> (for some fixed N)- Applications:
- Git, for content-addressed storage.
- A short summary of the contents of a file.
- Commitment schemes.
-
Key derivation functions
- Applications:
- Producing keys from passphrases for use in other cryptographic algorithms
- Storing login credentials.
- Applications:
-
Symmetric cryptography
-
keygen() -> key (this function is randomized) encrypt(plaintext: array<byte>, key) -> array<byte> (the ciphertext) decrypt(ciphertext: array<byte>, key) -> array<byte> (the plaintext) -
Applications:
- Encrypting files for storage in an untrusted cloud service.
-
-
Asymmetric cryptography
-
keygen() -> (public key, private key) (this function is randomized) encrypt(plaintext: array<byte>, public key) -> array<byte> (the ciphertext) decrypt(ciphertext: array<byte>, private key) -> array<byte> (the plaintext) sign(message: array<byte>, private key) -> array<byte> (the signature) verify(message: array<byte>, signature: array<byte>, public key) -> bool (whether or not the signature is valid) -
Applications
- PGP email encryption.
- Private messaging.
- Signing software.
-
Key Distribution
-
-
Case Studies
-
Resouces
- Cryptographic Right Answers: answers “what crypto should I use for X?” for many common X.